import {
    DIC
} from '@/const/dic'
export const storeManageOption = {
    border: true,
    selection: true,
    columnBtn: false,
    refreshBtn: false,
    // addBtn: false,
    // delBtn: false,
    // editBtn: false,
    viewBtn: true,
    menuWidth:200,
    menuAlign: 'center',
    formWidth: '100%',
    formtitle:"企业新增",
    align: 'center',
    stripe: true,
    label:"企业添加",
    size:'small',
    card:true,
    dicData : DIC.SHOPSTATUS,
    group:[
        {
            icon:'el-icon-info',
            label: '所属区域',
            prop: 'group',
            column: [

                /**
                 * 店铺区域查看时显示结束
                 */

                /**
                 * 店铺区域编辑时显示开始
                 */                {
                    label: '省份',
                    prop: 'provincesId',
                    fixed: true,
                    type: 'select',
                    viewDisplay:true,
                    span:8,
                    props: {
                        label: 'areaName',
                        value: 'id'
                    },
                    cascaderItem: ['cityId', 'areaId'],
                    cascaderChange: true,
                    dicUrl: `/shop/shopArea/getCity/all`,
                    rules: [
                        {
                            required: true,
                            message: '请选择省份',
                            trigger: 'blur'
                        }
                    ]
                },

                {
                    label: '城市',
                    prop: 'cityId',
                    type: 'select',
                    span:8,
                    props: {
                        label: 'areaName',
                        value: 'id'
                    },
                    defaultIndex: 1,
                    viewDisplay:true,
                    dicFlag: false,
                    dicUrl: `/shop/shopArea/getCity/{{key}}`,
                    rules: [
                        {
                            required: true,
                            message: '请选择城市',
                            trigger: 'blur'
                        }
                    ]
                },
                /**区县区域ID*/
                {
                    label: '区县',
                    prop: 'areaId',
                    type: 'select',
                    span:8,
                    props: {
                        label: 'areaName',
                        value: 'id'
                    },
                    defaultIndex: 1,
                    dicFlag: false,
                    dicUrl: `/shop/shopArea/getCity/{{key}}`,
                    viewDisplay:true,

                    rules: [
                        {
                            required: true,
                            message: '请选择城市',
                            trigger: 'blur'
                        }
                    ]
                },
                {
                    label: "详细地址",
                    prop: "address",
                    width: "200",
                    span:25,
                    fixed: true,
                    row:true,
                    rules: [{
                        required: true,
                        message: "",
                        trigger: "blur"
                    }]
                },
                {
                    label: "一级分类",
                    span:8,
                    type: 'select',
                    prop: "oneClassId",
                    fixed: true,
                    props: {
                        label: 'className',
                        value: 'id'
                    },
                    cascaderItem: ['twoClassId'],
                    cascaderChange: true,
                    dicUrl: `/shop/shopClass/bigClass?str=1`,
                    rules: [{
                        required: true,
                        message: "",
                        trigger: "blur"
                    }]
                },
                {
                    label: '二级分类',
                    prop: 'twoClassId',
                    type: 'select',
                    span:8,
                    props: {
                        label: 'className',
                        value: 'id'
                    },
                    row: true,
                    defaultIndex: 1,
                    dicFlag: false,
                    dicUrl: `/shop/shopClass/bigClass?str={{key}}`,
                    rules: [
                        {
                            required: true,
                            message: '请选择城市',
                            trigger: 'blur'
                        }
                    ]
                },
            ]},
        {
            icon:'el-icon-info',
            label: '申请人资料',
            prop: 'group',
            column: [
                {
                    label: "申请用户",
                    prop: "userId",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "",
                        trigger: "blur"
                    }]
                },
                /**店主姓名*/
                {
                    label: "店主姓名",
                    prop: "name",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "店主姓名",
                        trigger: "blur"
                    }]
                },
                /**店主姓名*/
                {
                    label: "店铺名称",
                    prop: "storeName",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "店铺名称",
                        trigger: "blur"
                    }]
                },
                /**店主身份证号*/
                {
                    label: "身份证号",
                    prop: "idNumber",
                    width: "100",
                    hide: true,
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "身份证号",
                        trigger: "blur"
                    }]
                },
                /**手机号码*/
                {
                    label: "手机号码",
                    prop: "phone",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "手机号码",
                        trigger: "blur"
                    }]
                },
                /**店铺类型*/
                {
                    label: "店铺类型",
                    prop: "gradeId",
                    width: "100",
                    type:"radio",
                    span:25,
                    fixed: true,
                    dicData: DIC.SHOPSTATUS,
                    rules: [{
                        required: true,
                        message: "店铺类型",
                        trigger: "blur"
                    }]
                },
            ]},{

            icon:'el-icon-info',
            label: '资质照片',
            prop: 'group',
            column: [
                {
                    label: "营业执照",
                    prop: "businessImgId",
                    type:"upload",
                    width: "100",
                    fixed: true,
                    listType: 'picture-img',
                    props:{
                        name:'label',
                        url:'url'
                    },
                    canvasOption: {
                        text: 'tracer',
                        ratio: 0.1,
                        color:'#FF3030',
                    },
                    action:"/upload/file/fileUplod?projectName=Tracer&modelName=ShopApply",
                    rules: [{
                        required: true,
                        message: "",
                        trigger: "blur"
                    }]
                },
                /**店主姓名*/
                {
                    label: "身份照片",
                    prop: "cardImgId",
                    type:"upload",
                    width: "100",
                    fixed: true,
                    listType: 'picture-img',

                    props:{
                        name:'label',
                        url:'url'
                    },
                    canvasOption: {
                        text: 'tracer',
                        ratio: 0.1
                    },
                    action:"/upload/file/fileUplod?projectName=Tracer&modelName=ShopApply",
                    rules: [{
                        required: true,
                        message: "店主姓名",
                        trigger: "blur"
                    }]
                },
            ]},
        {

            icon:'el-icon-info',
            label: '状态信息',
            prop: 'group',
            column: [
                /**店铺状态*/
                {
                    label: "店铺状态",
                    prop: "storeStatus",
                    type:"radio",
                    width: "100",
                    fixed: true,
                    dicData: DIC.STORESTATUS,
                    rules: [{
                        required: true,
                        message: "请确认是否推荐",
                        trigger: "blur"
                    }]
                },

                {
                    label: "有效期",
                    prop: "validityTime",
                    type:"datetimerange",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "请选择有效期",
                        trigger: "blur"
                    }]
                },
                {
                    label: "店铺模板",
                    prop: "templateId",
                    type:"radio",
                    dicData: DIC.TEMPLATESTATUS,
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "请选择模板",
                        trigger: "blur"
                    }]
                },


            ]},
        {

            icon:'el-icon-info',
            label: '推荐信息',
            prop: 'group',
            column: [
                {
                    label: "推荐",
                    prop: "storeRecommend",
                    type:"switch",
                    width: "100",
                    fixed: true,
                    dicData: DIC.ADDRESSTYPE,
                    rules: [{
                        required: true,
                        message: "请确认是否推荐",
                        trigger: "blur"
                    }]
                },
                {
                    label: "推荐时间",
                    prop: "storeRecommendTime",
                    type:"datetimerange",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "请选择推荐时间段",
                        trigger: "blur"
                    }]
                },
            ]},
        {

            icon:'el-icon-info',
            label: '搜索优化',
            prop: 'group',
            column: [
                {
                    label: "简介",
                    prop: "storeSeoDescription",
                    type:"textarea",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "请输入简介",
                        trigger: "blur"
                    }]
                },
                {
                    label: "关键字",
                    prop: "storeSeoKeywords",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "请输入关键字",
                        trigger: "blur"
                    }]
                },
                {
                    label: "域名前缀",
                    prop: "storeSecondDomain",
                    width: "100",
                    fixed: true,
                    rules: [{
                        required: true,
                        message: "请输入域名前缀",
                        trigger: "blur"
                    }]
                },
            ]},
        {

            icon:'el-icon-info',
            label: '店铺图片',
            prop: 'group',
            column: [
                {
                    label: "头图片",
                    prop: "bannerImgId",
                    type:"upload",
                    width: "100",
                    fixed: true,
                    listType: 'picture-img',
                    props:{
                        name:'label',
                        url:'url'
                    },
                    canvasOption: {
                        text: 'tracer',
                        ratio: 0.1,
                        color:'#FF3030',
                    },
                    action:"/upload/file/fileUplod?projectName=Tracer&modelName=ShopApply",
                    rules: [{
                        required: true,
                        message: "",
                        trigger: "blur"
                    }]
                },
                /**LOGO*/
                {
                    label: "LOGO",
                    prop: "logoImgId",
                    type:"upload",
                    width: "100",
                    fixed: true,
                    listType: 'picture-img',

                    props:{
                        name:'label',
                        url:'url'
                    },
                    canvasOption: {
                        text: 'tracer',
                        ratio: 0.1
                    },
                    action:"/upload/file/fileUplod?projectName=Tracer&modelName=ShopApply",
                    rules: [{
                        required: true,
                        message: "店主姓名",
                        trigger: "blur"
                    }]
                },
            ]},

    ],
    column: [
    {
                label: "编号",
                prop: "id",
                width: "5",
                fixed: true,
                hide:true,
                visdiplay:false,
                rules: [{
                    required: true,
                    message: "请输入编号",
                    trigger: "blur"
                }]
            },

        /**店主姓名*/
        {
        label:"店主姓名",
        prop:"name",
        width:"50",
            hide:true,

            fixed: true,
            rules: [{
                   required: true,
                   message: "店主姓名",
                   trigger: "blur"
               }]
        },

        /**店主身份证号*/
        {
        label:"店主身份证号",
        prop:"idNumber",
            hide:true,
            width:"150",
       fixed: true,
            rules: [{
                   required: true,
                   message: "店主身份证号",
                   trigger: "blur"
               }]
        },
        /**店铺名称*/
        {
        label:"店铺名称",
        prop:"storeName",
        width:"100",
       fixed: true,
            rules: [{
                   required: true,
                   message: "店铺名称",
                   trigger: "blur"
               }]
        },


        /**店铺分类ID*/
        {
            label: "一级分类",
            span:8,
            type: 'select',
            prop: "oneClassId",
            fixed: true,
            props: {
                label: 'className',
                value: 'id'
            },
            cascaderItem: ['twoClassId'],
            cascaderChange: true,
            dicUrl: `/shop/shopClass/bigClass?str=1`,
            rules: [{
                required: true,
                message: "",
                trigger: "blur"
            }]
        },
        {
            label: '二级分类',
            prop: 'twoClassId',
            type: 'select',
            span:8,
            props: {
                label: 'className',
                value: 'id'
            },
            fixed: true,

            defaultIndex: 1,
            dicFlag: false,
            dicUrl: `/shop/shopClass/bigClass?str={{key}}`,
            rules: [
                {
                    required: true,
                    message: '请选择城市',
                    trigger: 'blur'
                }
            ]
        },

        /**邮政编码*/
        {
        label:"邮政编码",
        prop:"zip",
        width:"150",
            hide:true,

            fixed: true,
            rules: [{
                   required: true,
                   message: "邮政编码",
                   trigger: "blur"
               }]
        },


        /**等级*/
        {
            label:"等级",
            prop:"gradeId",
            width:"100",
            type:'radio',
            dicData: DIC.SHOPSTATUS,
            rules: [{
                required: true,
                message: "店铺等级",
                trigger: "blur"
            }]
        },
        /**0：审批成功，未缴费，1：正常，2：到期未续费，3：封店状态*/
        {
        label:"状态",
        prop:"storeStatus",
        width:"50",
            type:'radio',
            dicData: DIC.STORESTATUS,
       fixed: true,
            rules: [{
                   required: true,
                   message: "0：审批成功，未缴费，1：正常，2：到期未续费，3：封店状态",
                   trigger: "blur"
               }]
        },

        /**是否推荐商店*/
        {
        label:"推荐",
        prop:"storeRecommend",
        width:"50",
            type:"switch",

            dicData: DIC.ADDRESSTYPE,
            fixed: true,
            rules: [{
                   required: true,
                   message: "是否推荐商店",
                   trigger: "blur"
               }]
        },


        /**店铺信用*/
        {
        label:"信用",
        prop:"storeCredit",
        width:"50",
       fixed: true,
            rules: [{
                   required: true,
                   message: "店铺信用",
                   trigger: "blur"
               }]
        },
        /**店铺模板*/
        {
        label:"模板",
        prop:"templateId",
        width:"50",
            type:"radio",
            dicData: DIC.TEMPLATESTATUS,
            fixed: true,
            rules: [{
                   required: true,
                   message: "店铺模板",
                   trigger: "blur"
               }]
        },


        /**店铺优化关键字*/
        {
        label:"店铺优化关键字",
        prop:"storeSeoKeywords",
        width:"150",
            hide:true,

            fixed: true,
            rules: [{
                   required: true,
                   message: "店铺优化关键字",
                   trigger: "blur"
               }]
        },
        /**二级域名前缀*/
        {
        label:"前缀",
        prop:"storeSecondDomain",
        width:"50",
            fixed: true,
            rules: [{
                   required: true,
                   message: "二级域名前缀",
                   trigger: "blur"
               }]
        },
        /**收藏次数*/
        {
        label:"收藏",
        prop:"favoriteCount",
        width:"50",
            fixed: true,
            rules: [{
                   required: true,
                   message: "收藏次数",
                   trigger: "blur"
               }]
        },
        /**经度*/
        {
        label:"经度",
        prop:"storeLat",
        width:"150",
            hide:true,

            fixed: true,
            rules: [{
                   required: true,
                   message: "经度",
                   trigger: "blur"
               }]
        },
        /**纬度*/
        {
        label:"纬度",
        prop:"storeLng",
        width:"150",
            hide:true,

            fixed: true,
            rules: [{
                   required: true,
                   message: "纬度",
                   trigger: "blur"
               }]
        },
        /**店铺开通时间*/
        {
        label:"开通时间",
        prop:"openingTime",
            type:'datetime',
        width:"100",
            fixed: true,
            format: 'yyyy-MM-dd hh:mm:ss',
            rules: [{
                   required: true,
                   message: "店铺开通时间",
                   trigger: "blur"
               }]
        },
    ]

};

